// WH_Categorizer.cpp : Defines the entry point for the console application.
//

#include "stdafx.h"
#include "DayAppCol.h"
#include "Reader.h"
#include "Writter.h"
#include <iostream>

int _tmain(int argc, _TCHAR* argv[])
{
	char path[255];
	if(argc<2)
	{
		std::cout<<"Input date file path(ex z:\\patient_FixedApp.txt):"<<std::endl;
		std::cin>>path;
	}
	else
		strcpy_s(path,argv[1]);
	if(path!=0)
	{
		std::cout<<path;
		char* targetPath;
		std::string s(path);
		size_t found;
		found=s.find_last_of("/\\");
		std::string tmp = (std::string)s.substr(0,found);
		targetPath = (char*)tmp.c_str();

		DayAppCol* model = Reader::readFromFile(path);
		Writter::writeToFile(targetPath,model);
	}
	return 0;
}

